<?php /*a:2:{s:54:"/www/wwwroot/mall/public/template/user/vip/rebate.html";i:1626515787;s:64:"/www/wwwroot/mall/public/template/user/../index/public/mlay.html";i:1624501447;}*/ ?>
<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="x-ua-compatible" content="ie=edge">
		<title>我的返佣</title>
		<meta name="keywords" content="<?php echo config('app.web_site_keywords'); ?>">
		<meta name="description" content="<?php echo config('app.web_site_description'); ?>">
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, shrink-to-fit=no, user-scalable=no">
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		
		
		<!-- Icons -->
		<link rel="icon" href="/static/images/favicon.ico">
		<!-- END Icons -->
		
		<!-- Stylesheets -->
		<link rel="stylesheet" href="/static/libs/weui/css/weui.min.css">
		<link rel="stylesheet" href="/static/libs/weui/css/common.css?v=<?php echo config('app.asset_version'); ?>">
		<link rel="stylesheet" href="/static/css/font/iconfont.css?v=<?php echo config('app.asset_version'); ?>">
		<!-- END Stylesheets -->
		
<style>
	html {
		height: 100%;
	}

	body {
		height: 100%;
	}

	#app {
		height: 100%;
		/* background: #fff; */
	}

	.money {
		background-image: url(/template/static/img/my/mybag.png);
		background-repeat: no-repeat;
		background-size: 100% auto;
		background-position: bottom center;
		display: flex;
		height: 7rem;
		justify-content: space-between;
		padding: 0 2rem;
		padding-top: 1rem;
		font-size: 0.7rem;
	}

	.users {
		background: #fff;
		padding: 0.5rem 1rem;
		font-size: 0.7rem;
		border-radius: 10px;
		margin: 0.5rem 0.5rem;
	}
	.footer_show{
		text-align: center;
		font-size: 0.7rem;
		color: #939393;
		padding: 0.5rem 0;
	}
	.app_money{
		background: #ffffff;
		padding: 0.2rem 0.5rem;
		border-radius: 30px;
		margin-top: 1rem;
	}
	
</style>
<link rel="stylesheet" href="/template/static/css/public.css" />

	</head>
	<body id="<?php echo htmlentities(strtolower(app('request')->app())); ?>-<?php echo htmlentities(strtolower(app('request')->controller())); ?>-<?php echo htmlentities(strtolower(app('request')->action())); ?>">
		<!-- Page Container -->
		<div class="page" id="main">
			

			
<div id="app">
	<div>
		<div style="">
			<div class="money" style="">
				<div style="text-align: center;color: #fff;">
					<div style="font-size: 1rem;font-weight: bold;">
						￥<?php echo htmlentities($vip['money_take']); ?>
					</div>
					<div>可提现余额</div>
				</div>
				<div style="text-align: center;color: #e5bf30;">
					<div @click="app_money" class="app_money">申请提现</div>
				</div>
			</div>
		</div>
		<div style="margin-top: -2rem;color: #343434;font-size: 0.7rem;display: flex;justify-content: space-between;padding: 0 2rem;" class="">
			<span>今日￥<?php echo htmlentities($vip['today']); ?></span>
			<span>本月￥<?php echo htmlentities($vip['month']); ?></span>
			<span>累计￥<?php echo htmlentities($vip['all']); ?></span>
		</div>
		<div v-for="(item,index) in Data" class="users">
			<p v-cloak>
			<div class="flex ju_sb">
				<span v-cloak>{{item.from}}  <font color="#006600">[{{item.pluser}}]</font></span>
				<span v-cloak style="color: rgb(229, 191, 48)">{{item.model}}：{{item.money}}元</span>
				<!-- <span  v-cloak>{{item.type}}</span> -->
			</div>
			<div style="padding: 0.5rem 0;" class="flex ju_sb">
				<!-- <span v-cloak></span> -->
				<span v-cloak><font v-if="item.model != '申请提现'">{{item.pay}}元×{{item.pre}}</font></span>
				<span style="color: #acacac;"v-cloak>{{item.time}}</span>
				<!-- <span v-cloak>返佣</span> -->
			</div>
			<div class="flex ju_sb">
				
			</div>	
			</p>
		</div>
		<div v-if="show" class="footer_show">
			没有更多了
		</div>
	</div>
</div>

		</div>
		<!-- END Page Container -->
		<!-- FOOT -->
		
		
		<!-- Footer -->
		<!-- 工具栏 -->
		<div class="footer"></div>
		<?php if(!(empty($nav['main_nav']) || (($nav['main_nav'] instanceof \think\Collection || $nav['main_nav'] instanceof \think\Paginator ) && $nav['main_nav']->isEmpty()))): ?>
		<nav class="bar-tab weui-flex">
			<?php if(is_array($nav['main_nav']) || $nav['main_nav'] instanceof \think\Collection || $nav['main_nav'] instanceof \think\Paginator): $i = 0; $__LIST__ = $nav['main_nav'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$menu): $mod = ($i % 2 );++$i;?>
			<a class="tab-item weui-flex__item<?php if(isset($active) && $active == $menu['rel']): ?> active<?php endif; ?>" href="<?php echo htmlentities($menu['url']); ?>">
				<span class="icoimg <?php echo htmlentities($menu['css']); if(isset($active) && $active == $menu['rel']): ?>-full<?php endif; ?>"></span>
				<span class="tab-label"><?php echo htmlentities($menu['title']); ?></span>
			</a>
			<?php endforeach; endif; else: echo "" ;endif; ?>
		</nav>
		<?php endif; ?>
		<!-- Footer -->
		

		
		<ul id="Fixed">
			<li id="goTop" class="ico ico-up hidden" title="去顶部"></li>
		</ul>
		
		<!-- END FOOT-->
		<div class="hidden">
			
			<?php echo config('app.web_site_statistics'); ?>
			
		</div>
		<!--js -->
		<script src="/static/libs/weui/js/jquery.min.js"></script>
		<script src="/static/libs/weui/js/weui.min.js"></script>
		<script src="/static/libs/weui/js/common.js?<?php echo config('app.asset_version'); ?>"></script>
		
		<?php if(!(empty($jssdk) || (($jssdk instanceof \think\Collection || $jssdk instanceof \think\Paginator ) && $jssdk->isEmpty()))): ?>
		<script src="https://res.wx.qq.com/open/js/jweixin-1.6.0.js"></script>
		<script>
			wx.config({
				debug: false,
				appId: '<?php echo htmlentities($jssdk['appid']); ?>',
				timestamp: '<?php echo htmlentities($jssdk['timestamp']); ?>',
				nonceStr: '<?php echo htmlentities($jssdk['noncestr']); ?>',
				signature: '<?php echo htmlentities($jssdk['signature']); ?>',
				jsApiList: [
					'updateAppMessageShareData',
					'updateTimelineShareData',
					'hideMenuItems',
					'showMenuItems',
					'closeWindow',
				],
				openTagList: ['wx-open-launch-weapp']
			});
			wx.ready(function() {
				wx.updateAppMessageShareData({
					title: "<?php echo htmlentities((isset($share['title']) && ($share['title'] !== '')?$share['title']:config('app.web_site_title'))); ?>", // 分享标题
					desc: "<?php echo htmlentities((isset($share['desc']) && ($share['desc'] !== '')?$share['desc']:config('app.web_site_slogan'))); ?>", // 分享描述
					link: "<?php echo htmlentities((isset($share['url']) && ($share['url'] !== '')?$share['url']:$jssdk['url'])); ?>", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
					imgUrl: "<?php echo htmlentities((isset($share['img']) && ($share['img'] !== '')?$share['img']:app('request')->scheme() . '://' .app('request')->host() .'/static/images/share.png')); ?>", // 分享图标
					success: function() {
						// 设置成功
					}
				});
				wx.updateTimelineShareData({
					title:  "<?php echo htmlentities((isset($share['title']) && ($share['title'] !== '')?$share['title']:config('app.web_site_title'))); ?>", // 分享标题
					link: "<?php echo htmlentities((isset($share['url']) && ($share['url'] !== '')?$share['url']:$jssdk['url'])); ?>", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
					imgUrl: "<?php echo htmlentities((isset($share['img']) && ($share['img'] !== '')?$share['img']:app('request')->scheme() . '://' .app('request')->host() .'/static/images/share.png')); ?>", // 分享图标
					success: function() {
						// 设置成功
					}
				});
				<?php if(!(empty($share['hide']) || (($share['hide'] instanceof \think\Collection || $share['hide'] instanceof \think\Paginator ) && $share['hide']->isEmpty()))): ?>
				wx.hideMenuItems({
					menuList: ['menuItem:copyUrl', 'menuItem:originPage', 'menuItem:readMode', 'menuItem:openWithQQBrowser',
						'menuItem:openWithSafari', 'menuItem:share:email', 'menuItem:favorite', 'menuItem:share:qq',
						'menuItem:share:weiboApp', 'menuItem:favorite', 'menuItem:share:QZone'] // 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
				});
				<?php endif; ?>
				wx.showMenuItems({
					menuList: ["menuItem:profile", "menuItem:addContact", ] // 要显示的菜单项，所有menu项见附录3
				});
			});
		</script>
		<?php endif; ?>
		
		
<!-- 引入vue.js文件使用vue开发 -->
<script src="/template/static/js/public/vue.min.js" type="text/javascript" charset="utf-8"></script>
<script>
	var vm = new Vue({
		el: "#app",
		data() {
			return {
				list: [
					{
						img: '/template/static/img/my_promotion/my_user.png',
						text: '我的用户'
					}, {
						img: '/template/static/img/my_promotion/the_trade_order.png',
						text: '交易订单'
					},
				],
				Data: [],
				page: 1, //页数
				last_page: '', //总页数
				isLoadding: false,
				show: false
			}
		},
		//计算属性	
		computed: {},
		//监听属性
		watch: {},
		//钩子函数	
		created() {
			this.shuju()
		},
		mounted() {
			window.addEventListener('scroll', this.handleScroll); // 监听滚动事件，然后用handleScroll这个方法进行相应的处理

		},
		methods: {
			handleScroll() {
				//变量scrollTop是滚动条滚动时，距离顶部的距离
				var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
				//变量windowHeight是可视区的高度
				var windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
				//变量scrollHeight是滚动条的总高度
				var scrollHeight = document.documentElement.scrollHeight || document.body.scrollHeight;
				//滚动条到底部的条件
				if (scrollTop + windowHeight >= scrollHeight && vm.isLoadding == false) {
					//加载数据的函数
					console.log("距顶部" + scrollTop + "可视区高度" + windowHeight + "滚动条总高度" + scrollHeight);
					if (this.page < this.last_page) {
						this.page++
						this.shuju();
					}
				}
			},
			shuju: function() {
				let that = this
				var loading = weui.loading('loading', {
					content: '正在载入'
				});
				$.post("", {
					page: that.page
				}, function(res) {
					vm.last_page = res.data.last_page //最后页数	
					if(vm.page > 1) {
						vm.Data = vm.Data.concat(res.data.items);
						vm.show = true
						console.log(vm.Data);
					}else {
						// console.log(res);
						vm.Data = res.data.items
					}
					loading.hide();
					
				});
			},
			app_money() {
				window.location.href = "<?php echo real_url('user/vip/take'); ?>"
			}

		}
	})
</script>

	</body>
</html>
